<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Demo14</title>
  <style>
  .red{color:red;}
  .green{color:green;}
  .background{ background-color: orange;}
</style>
  <script src="js/vue.js"></script>
</head>
<body>
<div id="app"></div>
</body>
<script>
  const app=Vue.createApp({
    data(){
      return {
        classString:'red',
        classObject:{red:true,background:true}
      }
    },
    template:`//vm.$data.classString='green' 可以在F12后操作
      <h2 v-bind:class="classString">JSPang.com</h2>
      <h2 v-bind:class="classObject">JSPang.com</h2>
        `
  })
  const vm=app.mount("#app")

</script>

</html>
